wayland: Don't assume drag context has a source window when finalizing
authorJonas Ådahl <jadahl@gmail.com>
Mon, 3 Aug 2015 06:26:39 +0000 (14:26 +0800)
committerJonas Ådahl <jadahl@gmail.com>
Wed, 5 Aug 2015 02:31:55 +0000 (10:31 +0800)
commit27763743b1d1c1900932099ff10e64f4a2734148
tree8c8b8c0f8f3b38758b74d4a7f69ddb4021969189
parent69c9cb85e2dfb5169a7d3b71b4ef7e9203126a83
wayland: Don't assume drag context has a source window when finalizing

Only a drag context which was created with 'drag_begin' will be
guaranteed to have a source window at all times. Thus, in finalize we
cannot assume we can retrieve a GdkDisplay from the source_window
pointer since it may be NULL. Though, the display is only needed for
contexts created via 'drag_begin' thus we can retrieve it after
checking that is the case.

https://bugzilla.gnome.org/show_bug.cgi?id=749339
gdk/wayland/gdkdnd-wayland.c